using System;
using EPiServer.Common;
using EPiServer.Common.Categories;

namespace EPiAbstractions.Common.Categories
{
    public interface ICategoryHandlerFacade
    {
        ICategory AddCategory(ICategory category);

        void UpdateCategory(ICategory category);

        void RemoveCategory(ICategory category);

        ICategory GetCategory(Int32 id);

        ICategory GetCategory(String path);

        ICategory GetCategory(ISite site, String path);

        CategoryCollection GetCategories();

        CategoryCollection GetCategories(ISite site);

        CategoryCollection GetCategories(ICategory parentCategory);

        CategoryCollection GetEntityCategories(ICategorizableEntity categorizableEntity);

        CategorizableEntityCollection GetCategorizedItems(ICategory category, Int32 page, Int32 pageSize, out Int32 totalItems);

        CategorizableEntityCollection GetCategorizedItems(Type type, ICategory category, Int32 page, Int32 pageSize, out Int32 totalItems);

        CategorizableEntityCollection GetCategorizedItems(CategoryCollection categories, Int32 page, Int32 pageSize, out Int32 totalItems);

        CategorizableEntityCollection GetCategorizedItems(Type type, CategoryCollection categories, Int32 page, Int32 pageSize,
                                                          out Int32 totalItems);

        event EPiServerCommonEventHandler CategoryAdded;

        event EPiServerCommonEventHandler CategoryUpdated;

        event EPiServerCommonEventHandler CategoryRemoved;
    }
}